From: Florian Müllner Date: Tue, 13 Jun 2017 04:49:07 +0000 (+0200) Subject: notificationDaemon: Avoid access to undefined property X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~261 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d815c5dfc04a1fe400a32c29eada880d3d6f8568;p=gnome-shell.git notificationDaemon: Avoid access to undefined property Avoid a warning when assigning from an undefined property by making sure to pass a proper null value instead. https://bugzilla.gnome.org/show_bug.cgi?id=781471 --- diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index 315bfdb17..c8cba607b 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -186,7 +186,8 @@ const FdoNotificationDaemon = new Lang.Class({ return source; } - source = new FdoNotificationDaemonSource(title, pid, sender, ndata ? ndata.hints['desktop-entry'] : null); + let appId = ndata ? ndata.hints['desktop-entry'] || null : null; + source = new FdoNotificationDaemonSource(title, pid, sender, appId); this._sources.push(source); source.connect('destroy', Lang.bind(this, function() {